package com.grad.why.studentsystem.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.grad.why.studentsystem.domain.User;
import com.grad.why.studentsystem.mapper.UserMapper;
import com.grad.why.studentsystem.service.StudentarrivedinfoService;
import com.grad.why.studentsystem.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

@Component
@Service(interfaceClass = UserService.class)
@Transactional
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public int checkUserIsExistByUserName(String username) {
        return userMapper.checkUserIsExistByUserName(username);
    }

    @Override
    public User getUserByUserNameAndPassword(String username) {
        return userMapper.getUserByUserNameAndPassword(username);
    }
}
